<%@page import="pe.com.certicom.scv.persistence.TvpersonMapper"%>
<%@ include file="../common/header.jsp"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@page import="pe.com.certicom.scv.domain.Tvperson"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Fichas Pandero</title>
<script>
function checkurl(url){
	var request = new XMLHttpRequest();
	request.open("GET", url);
	request.onload = function()
	{
	    if ((request.status >= 200 && request.status < 300) || request.status == 304)
	        alert("Exists!");
	    else
	        alert("HTTP response isn't success, URL doesn't exist or is currently unavailable");
	};
	request.onerror = function()
	{
	    alert("Loading URL errored out, server doesn't exist or is currently unavailable");
	};
	request.send(null);
	}
function VerFotoPas1(){
	var Var = '${coper}';
    var cmdwin=null;
    var url;
    url="http://190.116.34.52/PAS/"+Var+"/foto1.jpg";
	h = 350;
    w=1000;
    window.open(url,"","height="+(h-30)+",width="+(w-10)+",top=50,left=50,scrollbars=yes,resizable=no,menubar=no,location=no,status=yes,dependent=yes");
}

function VerFotoPas2(){
	var Var = '${coper}';
    var cmdwin=null;
    var url;
    url="http://190.116.34.52/PAS/"+Var+"/foto2.jpg";
    h = 350;
    w=1000;
    window.open(url,"","height="+(h-30)+",width="+(w-10)+",top=50,left=50,scrollbars=yes,resizable=no,menubar=no,location=no,status=yes,dependent=yes");
}

function VerFotoPas3(){
	var Var = '${coper}';
    var cmdwin=null;
    var url;
    url="http://190.116.34.52/PAS/"+Var+"/foto3.jpg";
    h = 350;
    w=1000;
    window.open(url,"","height="+(h-30)+",width="+(w-10)+",top=50,left=50,scrollbars=yes,resizable=no,menubar=no,location=no,status=yes,dependent=yes");
}

function VerFotoPas4(){
	var Var = '${coper}';
	var cmdwin=null;
    var url;
    url="http://190.116.34.52/PAS/"+Var+"/foto4.jpg";
    h = 350;
    w=1000;
    window.open(url,"","height="+(h-30)+",width="+(w-10)+",top=50,left=50,scrollbars=yes,resizable=no,menubar=no,location=no,status=yes,dependent=yes");
}

function VerFotoPas5(){
	var Var = '${coper}';
    var cmdwin=null;
    var url;
    url="http://190.116.34.52/PAS/"+Var+"/foto5.jpg";
    h = 350;
    w=1000;
    window.open(url,"","height="+(h-30)+",width="+(w-10)+",top=50,left=50,scrollbars=yes,resizable=no,menubar=no,location=no,status=yes,dependent=yes");
}
</script>
</head>
<c:if test="${panderomodificado==null}">
	<table class=tdMensaje>
		<tr>
			<td><strong>FICHA DE PANDERO NO MODIFICADA</strong></td>
			<td>&nbsp;*&nbsp; <span	style='color: red'>Revise los datos del formulario</span></td>
		</tr>
	</table>
</c:if>

<form:form modelAttribute="Pandero"
	action="${pageContext.request.contextPath}/pandero/modificar.html">
	<!-- form:hidden path="CO_OPER" value="916"/-->
	<form:hidden path="ES_REGISTRO" value="H"/>
	<form:hidden path="CO_PERSONA"  />
	<form:hidden path="CO_OPER" value="<%=usuario.getCo_oper()%>" />
	<form:hidden path="ID_MOD_REGISTRO" value="<%=usuario.getCo_oper()%>" />
	
	
	<table class="tableContainer">
		<tr class="tdfondoTitulo">
			<th colspan="3" height="20" align="center">VERIFICACI&Oacute;N ESPECIAL - PANDERO</th>
				<td></td>
		</tr>
		<tr>
			<c:if test="${encabezado!=null}">
				<th height="20" align="center" colspan="10" scope="row"><input
					value="${encabezado}" /></th>
			</c:if>
		</tr>
		<tr>
			<td align='center'><input name="btnconfirmar" id="btnconfirmar"
				type="submit" value="Confirmar" onclick="confirmar();"
				class=FormButtonsGreen
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
			<td align='center'><input name="btnimprimir" id="btnimprimir"
				type="button" value="Imprimir" onclick="javascript:window.print()"
				class=FormButtonsGreen
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
			<td align='center'><input name="btnregresar" id="btnregresar"
				type="button" value="Retornar" onclick="javascript:history.back()"
				class=FormButtonsGreen
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
		</tr>

	</table>
	<br>

	<!-- Cabecera -->
	<table class="tableContainer">
		<tr class="tdfondoTitulo">
			<th width="100%" height="20" colspan="4" align="center"><div align="center">&nbsp;DATOS GENERALES</div>
		</tr>
		<tr>
			<td height="20" width="20%"><div align="right">Nro de Ficha&nbsp;:&nbsp;</div></td>
			<td>
				<div class="label">
					<form:input disabled="true" path="CO_PERSONA" />
				</div>
			</td>

			<td height="20" width="20%"><div align="right">Dep/Prov/Dist&nbsp;:&nbsp;</div></td>
			<td>
				<div class="label">
					<form:input disabled="true" path="NO_APENOM" />
				</div>
			</td>
		</tr>
		<tr>
			<td height="20" width="20%"><div align="right">Centro
					Comercial&nbsp;:&nbsp;</div></td>
			<td>
				<div class="label">
					<form:input disabled="true" path="DE_TERRITORIO" />
				</div>
			</td>
			<td height="20" width="20%"><div align="right">Fecha de
					Visita&nbsp;:&nbsp;</div></td>
			<td>
				<div class="label">
					<form:input disabled="true" path="FE_VISIT" />
					
				</div>
			</td>
		</tr>
		<tr>
			<td height="20" width="20%"><div align="right">Fuerza de
					Venta&nbsp;:&nbsp;</div>
			<td>
				<div class="label">
					<form:input disabled="true" path="NO_OFICINA" />
				</div>
			</td>
			<td height="20" width="20%"><div align="right">Hora de
					Visita&nbsp;:&nbsp;</div></td>
			<td>
				<div class="label">
					<form:input disabled="true" path="NO_VISIT" />
				</div>
			</td>
		</tr>
	</table>
	<br>

	<jsp:include page="/WEB-INF/jsp/pandero/modificar2.jsp" />
	<jsp:include page="/WEB-INF/jsp/pandero/modificar3.jsp" />
	<jsp:include page="/WEB-INF/jsp/pandero/modificar4.jsp" />

	<!-- OBSERVACIONES -->
	<table class="tableContainer">
		<tr class="tdfondoTitulo">
			<th colspan="5" align="left" height="20">&nbsp;&nbsp;FOTOS DE LA VERIFICACI&Oacute;N</th>
		</tr>
		<tr>
		<td align="center"><input type="button" value="Foto 1" onclick="VerFotoPas1()" /></td>
		<td align="center"><input type="button" value="Foto 2" onclick="VerFotoPas2()" /></td>
		<td align="center"><input type="button" value="Foto 3" onclick="VerFotoPas3()" /></td>
		<td align="center"><input type="button" value="Foto 4" onclick="VerFotoPas4()" /></td>
		<td align="center"><input type="button" value="Foto 5" onclick="VerFotoPas5()" /></td>
		</tr>
	</table>
	<br>
	<br>
	<table class="tableContainer">
		<tr class="tdfondoTitulo">
			<th colspan="4" align="left" height="20">&nbsp;&nbsp;DATOS DE LA VERIFICACI&Oacute;N</th>
		</tr>
		<tr>
			<td><div align="right">Observacion :&nbsp;</div></td>
			<th colspan="1" align="left"><form:textarea path="DE_OPINVERIF" cols="100" rows="4" /></th>
			<td></td><td/>
		</tr>
		<tr>
			<td><div align="right">Verificador :&nbsp;</div></td>
			<td><form:input path="CO_VERIFIC" /></td>
			<td><div align="right">Estado :&nbsp;</div></td>
			<td><form:select path="CO_ESTADO">
					<form:option value="" label="---" />
					<form:option value="O" label="CONFORME" />
					<form:option value="G" label="NO CONFORME" />
					<form:option value="I" label="INUBICABLE" />
					<form:option value="D" label="DEVUELTO" />
					<form:option value="S" label="SIN RESPUESTA" />
					<form:option value="S" label="TRAMITE" />
				</form:select>
				<span style='color: red'><form:errors path="CO_ESTADO" /></span>
				</td>
		</tr>

		
		<tr>
		<td>
		</td>
			<td align='center'><input name="btnconfirmar" id="btnconfirmar"
				type="submit" value="Confirmar" onclick="confirmar();"
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
			<td align='center'><input name="btnimprimir" id="btnimprimir"
				type="button" value="Imprimir" onclick="javascript:window.print()"
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
			<td align='center'><input name="btnregresar" id="btnregresar"
				type="button" value="Retornar" onclick="javascript:history.back()"
				onFocus="javascript:this.className='FormButtonsGreen_Over'"
				onchange="javascript: this.className='FormButtonsGreen'"
				onMouseDown="javascript: this.className='FormButtonsGreen_Press'"
				onMouseOver="javascript: this.className='FormButtonsGreen_Over'"
				onMouseOut="javascript: this.className='FormButtonsGreen'">
			</td>
			</tr>
	</table>
	<br>
</form:form>